package com.he.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.he.entity.ExpressCompany;
import com.he.service.ExpressCompanyService;
import com.he.mapper.ExpressCompanyMapper;
import org.springframework.stereotype.Service;

import java.util.List;

/**
* @author a'abc
* @description 针对表【express_company】的数据库操作Service实现
* @createDate 2025-07-29 11:46:00
*/
@Service
public class ExpressCompanyServiceImpl extends ServiceImpl<ExpressCompanyMapper, ExpressCompany>
    implements ExpressCompanyService{

    @Override
    public List<ExpressCompany> getAllCompanies() {
        return this.list();
    }

    @Override
    public ExpressCompany getByCode(String code) {
        QueryWrapper<ExpressCompany> wrapper = new QueryWrapper<>();
        wrapper.eq("code",code);
        return this.getOne(wrapper);
    }
}




